package com.example.demo.dao;

import com.example.demo.entity.HistoryEntity;
import com.example.demo.vo.HistoryVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface HistoryDao {
    List<HistoryEntity> getHistoryByUserId(@Param("user_id") int user_id);
    int addHistory(@Param("historyVo") HistoryVo historyVo);
    int delHistory(@Param("id") int id);
    int delHistoryByUserAndProduct(@Param("user_id") int user_id, @Param("products_id") int products_id);
    HistoryEntity getHistoryById(@Param("id") int id);
    int updateHistory(@Param("historyVo") HistoryVo historyVo);
  }